import React, { Component } from 'react';
import './index.css';

class Detail extends Component{

  state = this.props.location.state?this.props.location.state:{title:'eeee'};
  componentDidMount(){
    //console.log(this.props.location.state);

  }
  render(){

    return (
      <div className="Detail">
        <h1>{this.state.title}</h1>
        <h2><a href={this.state.url}>查看原文</a></h2>
        <div dangerouslySetInnerHTML={{__html: this.state.content}}></div>
      </div>
    )
  }
}

export default Detail;